# -*- coding:utf-8 -*-

from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import HTTPOperationConstants

class HTTPOPerationSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(HTTPOPerationSubDirectiveTree, self).__init__(parent)
        self.createHTTPOperationTreeNode()

    def createHTTPOperationTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "HTTPOperation"
        self.setText(0,"HTTP操作")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, HTTPOperationConstants.HTTPOperationConstants.HTTPRequestDirective, "HTTP请求")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, HTTPOperationConstants.HTTPOperationConstants.HTTPDownloadDirective, "HTTP下载")
